package cn.platform.mapper;

import cn.platform.entity.Comment;
import cn.platform.request.CommentRequest;
import cn.platform.response.CommentViewResponse;
import cn.platform.request.CommentViewRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * yjh
 */
@Mapper
public interface CommentMapper {
    // 查询前端显示的信息
    List<CommentViewResponse> listCommentView(CommentViewRequest req);

    // 查询
    List<Comment> listComment(Comment req);

    // 新增
    void insertComment(Comment req);

    // 更新，用id找，其余参数为更新内容，null值不更新
    void updateComment(Comment req);

    // 删除，用id找
    void deleteComment(@Param("id") int id);
}
